<template>
  <div class="fullscreen">
    <i @click="fullscr" class="el-icon-full-screen"></i>
  </div>
</template>

<script>
import screenfull from 'screenfull'
export default {
  methods: {
    // 进入/退出全屏
    fullscr () {
      // console.log(screenfull)
      if (!screenfull.isEnabled) {
        return this.$message.error('对不起，当前版本的浏览器不支持全屏')
      }
      screenfull.toggle()
    }
  }
}
</script>

<style lang="scss" scoped>
.fullscreen {
}
</style>
